﻿using Benlai.Util;
using Benlai.Model;
using Benlai.Model.Doc;
using Benlai.Bll.Doc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Benlai.Bll.Product;
using Benlai.Model.Product;

namespace BenlaiStudy.Controllers
{
    public class ProductServiceController : BaseController
    {
        //
        // GET: /ProductService/
        public ActionResult Index()
        {
            return View();
        }

        // GET: /ProductService/GetStoreAduitInfo
        /// <summary>
        /// 获取仓库审核的商品信息
        /// </summary>
        /// <param name="id">商品编号</param>
        /// <returns></returns>
        [HttpGet]
        public JsonResult GetStoreAduitInfo(int id)
        {
            var model = ProductClient.GetInstance().GetStoreAduitInfo(id);
            return Json(model, JsonRequestBehavior.AllowGet);
        }

        // POST: /ProductService/AduitProductByStore
        /// <summary>
        /// 仓库审核 商品信息
        /// </summary>
        /// <param name="model">仓库审核的商品信息</param>
        /// <returns></returns>
        [HttpPost]
        public JsonResult AduitProductByStore(StoreAduitProductModel model)
        {
            var flag = ProductClient.GetInstance().AduitProductByStore(model);
            return Json(flag);
        }

    }
}
